#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1.5e6 + 5;

int n, m;
int sum[N << 2];
void pushup(int p) { sum[p] = sum[p << 1] + sum[p << 1 | 1]; }
void build(int p, int l, int r) {
  if (l == r) {
    sum[p] = 1;
    return;
  }
  int mid = (l + r) >> 1;
  build(p << 1, l, mid);
  build(p << 1 | 1, mid + 1, r);
  pushup(p);
}

int query(int x, int p, int l, int r) {
  sum[p]--;
  if (l == r) return l;
  int mid = (l + r) >> 1;
  if (sum[p << 1] >= x)
    return query(x, p << 1, l, mid);
  else
    return query(x - sum[p << 1], p << 1 | 1, mid + 1, r);
}

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  build(1, 1, n);
  int x = 0, left = n;
  rep(i, 1, n) {
    int y;
    cin >> y;
    x = (x + y) % left;
    cout << query(x + 1, 1, 1, n) << endl;
    left--;
  }
  return 0;
}